﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;

namespace LabMS.Web.Structure
{
    public partial class LabManagement : Base.BasePage
    {
        public string URL = "#";
        protected void Page_Load(object sender, EventArgs e)
        {
            strPageUserType.Add("mana");

            //Module
            if (UserName == "admin")
            {
                URL = "../LabManage/AddNewLab.aspx"; ;
            }
            else if (!HaveModulePrivilege("SYSGL"))
            {
                SYSGL.Visible = false;
            }
            //Function
            if (UserName != "admin")
            {
                if (!HavePrivilege("ZJSYS"))
                {
                    ZJSYS.Visible = false;
                }
                else if (URL == "#")
                {
                    URL = "../LabManage/AddNewLab.aspx";
                }
                if (!HavePrivilege("SYSXX"))
                {
                    SYSXX.Visible = false;
                }
                else if (URL == "#")
                {
                    URL = "../LabManage/EditLabList.aspx";
                }
                if (!HavePrivilege("HJXX"))
                {
                    HJXX.Visible = false;
                }
                else if (URL == "#")
                {
                    URL = "../LabManage/EditAwardList.aspx";
                }
                if (!HavePrivilege("GZZD"))
                {
                    GZZD.Visible = false;
                }
                else if (URL == "#")
                {
                    URL = "../LabManage/EditRuleList.aspx";
                }
                if (!HavePrivilege("SYYF"))
                {
                    SYYF.Visible = false;
                }
                else if (URL == "#")
                {
                    URL = "../LabManage/EditLabRoomList.aspx";
                }
                if (!HavePrivilege("SYSJJYL"))
                {
                    SYSJJYL.Visible = false;
                }
                else if (URL == "#")
                {
                    URL = "../LabManage/LabIntroduction.aspx";
                }
            }
            

        }
    }
}
